package com.chushouya.manager.constants;


import com.general.framework.core.enums.IEnum;

import java.util.Objects;

public enum BindStatusEnum implements IEnum<Integer> {

    NORMAL(1, "已绑定"),
    FORBID(0, "未绑定");


    private Integer value;
    private String desc;

    BindStatusEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    @Override
    public Integer value() {
        return this.value;
    }

    @Override
    public String named() {
        return this.desc;
    }

    public static String getDesc(Integer value) {
        for (BindStatusEnum thisEnum : BindStatusEnum.values()) {
            if (Objects.equals(thisEnum.value, value)) {
                return thisEnum.desc;
            }
        }
        return "";
    }
}
